#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int len = s.size();
  int gen = 0;
  for (int i = 0; i < len; i++) {
    gen = gen + s[i] - '0';
  }
  int yu = 0;
  for (int i = 0; i < len; i++) {
    yu = yu * 10 + s[i] - '0';
    yu %= gen;
  }
  if (yu == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
